This commit is contained in:
Anatoliy Sablin
2020-04-07 22:44:09 +03:00
parent d4853b1154
commit a6968fb7e9
4 changed files with 5 additions and 5 deletions

View File

@@ -110,7 +110,7 @@ For sql provider (i.e. for the `synapseSql`):
```.yaml ```.yaml
synapseSql: synapseSql:
lookup: lookup:
query: 'select user_id as mxid, medium, address from user_threepids' # query for retrive 3PIDs for hashes. query: 'select user_id as mxid, medium, address from user_threepid_id_server' # query for retrive 3PIDs for hashes.
``` ```
For general sql provider: For general sql provider:

View File

@@ -129,7 +129,7 @@ threepid:
### hash lookup for synapseSql provider. ### hash lookup for synapseSql provider.
# synapseSql: # synapseSql:
# lookup: # lookup:
# query: 'select user_id as mxid, medium, address from user_threepids' # query for retrive 3PIDs for hashes. # query: 'select user_id as mxid, medium, address from user_threepid_id_server' # query for retrive 3PIDs for hashes.
# legacyRoomNames: false # use the old query to get room names. # legacyRoomNames: false # use the old query to get room names.
### hash lookup for ldap provider (with example of the ldap configuration) ### hash lookup for ldap provider (with example of the ldap configuration)

View File

@@ -125,7 +125,7 @@ public abstract class SqlConfig {
} }
public static class Lookup { public static class Lookup {
private String query = "SELECT user_id AS mxid, medium, address from user_threepids"; private String query = "SELECT user_id AS mxid, medium, address from user_threepid_id_server";
public String getQuery() { public String getQuery() {
return query; return query;
@@ -140,7 +140,7 @@ public abstract class SqlConfig {
private Boolean enabled; private Boolean enabled;
private String type = "mxid"; private String type = "mxid";
private String query = "SELECT user_id AS uid FROM user_threepids WHERE medium = ? AND address = ?"; private String query = "SELECT user_id AS uid FROM user_threepid_id_server WHERE medium = ? AND address = ?";
private Map<String, String> medium = new HashMap<>(); private Map<String, String> medium = new HashMap<>();
public Boolean isEnabled() { public Boolean isEnabled() {

View File

@@ -56,7 +56,7 @@ public class SynapseSqlProviderConfig extends SqlConfig {
if (getIdentity().isEnabled() && StringUtils.isBlank(getIdentity().getType())) { if (getIdentity().isEnabled() && StringUtils.isBlank(getIdentity().getType())) {
getIdentity().setType("mxid"); getIdentity().setType("mxid");
getIdentity().setQuery("SELECT user_id AS uid FROM user_threepids WHERE medium = ? AND address = ?"); getIdentity().setQuery("SELECT user_id AS uid FROM user_threepid_id_server WHERE medium = ? AND address = ?");
} }
if (getProfile().isEnabled()) { if (getProfile().isEnabled()) {